package com.gec;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**启动类
 * 扫描servlet组件 @ServletComponentScan
 * 开启事务管理 EnableTransactionManagement
 * 开启缓存 EnableCaching
 * @author : [chenxys]
 * @version : [v1.0]
 */
@Slf4j
@SpringBootApplication
@ServletComponentScan
@EnableCaching
@EnableTransactionManagement
public class ReggieApplication {
    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(ReggieApplication.class);
        /**
         * Banner.Mode.OFF 关闭
         * Banner.Mode.CONSOLE 控制台输出,默认方式
         * Banner.Mode.LOG 日志输出方式
         */
        //application.setBannerMode(Banner.Mode.OFF);
        //application.setBannerMode(Banner.Mode.CONSOLE);
        application.setBannerMode(Banner.Mode.LOG);

        application.run(args);
        log.info("项目启动成功...");
    }
}
